.PHONY: both
both: a b c
a:
	@gcc a.c -o a
b:
	@cd subdir1;make
c:
	@cd subdir2;make
